package com.liang.service.impl;

import com.liang.dao.UserCoordinationMapper;
import com.liang.service.UserCoordinationService;
import com.liang.utils.MybatisUtils;
import org.apache.ibatis.session.SqlSession;

public class UserCoordinationServiceImpl implements UserCoordinationService {
    static SqlSession sqlSessionAuto =null;
    static SqlSession sqlSession=null;
    //用户协同表插入方法
    public int insertUserCoordinationMapper(int usrId1, int userId2, double distance) {
        sqlSessionAuto = MybatisUtils.getSqlSessionAuto();
        UserCoordinationMapper mapper = sqlSessionAuto.getMapper(UserCoordinationMapper.class);
        int i = mapper.insertUserCoordinationMapper(usrId1, userId2, distance);
        sqlSessionAuto.close();
        return i;
    }
}
